package com.jiangli.mapper;

import com.github.pagehelper.Page;
import com.jiangli.entity.DishRating;
import com.jiangli.vo.DishRatingAdminVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DishRatingMapper {
    DishRating selectByUserIdAndDishId(Long userId, Long dishId);

    int updateScore(DishRating existingRating);

    int insert(DishRating newRating);

    Page<DishRatingAdminVO> getDishRatingByDishId(Long id);

    List<DishRating> getDishRating(Long id);
}
